<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<script type="text/javascript">
	$(function(){
		
		$("#id_re").keyup(function(){
			$("#idmess").html("");
			if($(this).val().length>3){
				$.ajax({
					type:"post",
					url:"idCheck.do",
					dataType:"json",	//JSON.parse()을 내부적으로 처리하여
					data:"id_re="+$("#id_re").val(),
					success:function(jsonData){	// 매개변수로 인자값으로 전달
						//alert(jsonData.str);
						 $("#idCheck_re").html(jsonData.str);
					}
				});// ajax
			}
		}); //$("#id_re").keyup
		
		
		
		
		
		$("#password_re").keyup(function(){
			$("#passmess").html("");
		});//$("#password_re").keyup
		
		$("#name_re").keyup(function(){
			$("#namemess").html("");
		});//$("#name_re").keyup
		
		$("#email_re").keyup(function(){
			$("#emailmess").html("");
		});//$("#email_re").keyup
		
	});
</script>
<form:form action="register.do" commandName="memberVO">

ID : 	<form:input path="id" id="id_re" name="id"/>
		<span id="idCheck_re"></span>
		<font color="red"><form:errors path="id" id="idmess"></form:errors></font><br>
		
Password : <form:input path="password" type="password" id="password_re" name="password"/>
				<font color="red"><form:errors path="password" id="passmess"></form:errors></font><br>
				
Name : <form:input path="name" id="name_re" name="name"/>			
		   <font color="red"><form:errors path="name" id="namemess"></form:errors></font><br>
		   
E-Mail : <form:input path="email" id="email_re" name="email"/>			
			 <font color="red"><form:errors path="email" id="emailmess"></form:errors></font><br>
			 
			<input type="submit" value="회원가입">
			<!-- <input type="reset" value="다시쓰기"> -->
</form:form>
